<div class="bg-light lter b-b wrapper-md">
    <h4 class="m-n font-thin">模块管理</h4>
    <!--<button ui-sref="app.modules" class="btn-back btn btn-dark btn-sm btn-rounded">-->
        <!--返回-->
    <!--</button>-->
</div>
<div class="wrapper-md" ng-controller="modulesAddCtrl">
    <div class="panel panel-default">
        <div class="panel-heading m-n">
            添加模块信息
        </div>
        <div class="panel-body">
            <form name="couponsForm" class="form-horizontal form-validation" ng-submit="addModules()">
                <div class="form-group">
                    <label class="col-sm-2 control-label">模块名称</label>
                    <div class="col-sm-5">
                        <input type="text" name="name" class="form-control" placeholder="请输入模块名称" ng-model="modulesAddService.modules.name" required>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">模块类型</label>
                    <div class="col-sm-5">
                        <select name="account" class="form-control" ng-model="modulesAddService.modules.columnId" required>
                            <option value="">请选择模块类型</option>
                            <option value="{{item.id}}" ng-repeat="item in columns">{{item.name}}</option>
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">只添加推荐商品</label>
                    <div class="col-sm-10">
                        <div class="pull-left">
                            <label class="i-switch m-t-xs m-r">
                                <input type="checkbox" ng-checked="modulesAddService.modules.isRecommandGoods==1" ng-click="modulesAddService.modules.isRecommandGoods=(modulesAddService.modules.isRecommandGoods==1?0:1)">
                                <i></i>
                            </label>
                        </div>
                        <label class="pull-left m-t-xs" ng-bind="{1:'已开启',0:'未开启'}[modulesAddService.modules.isRecommandGoods]"></label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">模块限制商品数量</label>
                    <div class="col-sm-1">
                        <input ui-jq="TouchSpin" ng-model="modulesAddService.modules.goodsQuantity" type="text" value="0" class="form-control text-center" data-min="0" data-max="50" data-step="1" data-decimals="0" style="display: block;">
                    </div>
                    <label class="col-sm-2 m-t-sm text-muted h6">至多添加50个商品</label>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">模块限制展示商品数量</label>
                    <div class="col-sm-1">
                        <input ui-jq="TouchSpin" ng-model="modulesAddService.modules.goodsExhibitionQuantity" type="text" value="0" class="form-control text-center" data-min="0" data-max="20" data-step="1" data-decimals="0" style="display: block; " required>
                    </div>
                    <label class="col-sm-2 m-t-sm text-muted h6">至多展示20个商品</label>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">模块排序</label>
                    <div class="col-sm-1">
                        <input ui-jq="TouchSpin" ng-model="modulesAddService.modules.sort" type="text" value="0" class="form-control text-center" data-min="0" data-max="100" data-step="1" data-decimals="0" style="display: block;">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-4 col-sm-offset-2">
                        <button type="submit" class="btn btn-success" ng-disabled="couponsForm.$invalid">保存</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>





